package com.david.musicapp.activity

import android.os.Bundle
import android.view.View
import androidx.appcompat.app.AppCompatActivity
import com.david.musicapp.R

class MainActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        findViewById<View>(R.id.test).setOnClickListener {
            //                val retrofit = MyRetrofitHelper.getInstance().getRetrofit("https://divaid.github.io")
            //                val interFace = MyRetrofitHelper.getInstance().retrofit.create(IMusicListMethod::class.java)

            //                val flowable = interFace.getMusics()
            //
            //                flowable.subscribeOn(Schedulers.io())
            //                    .observeOn(AndroidSchedulers.mainThread())
            //                    .subscribe(object : RetrofitBaseSubscriber() {
            //                        override fun onSuccess(responseStr: String?) {
            //                            Log.e("retrofit", "onSuccess: " + responseStr)
            ////                    getJsonObject(responseStr)
            //                        }
            //
            //                        override fun onFail(throwable: Throwable?) {
            //                            throwable?.printStackTrace()
            //                        }
            //
            ////                override fun getJavaObject(response: String?): MyRetrofitResponse {
            ////                    return JSON.parseObject(response, MyRetrofitResponse::class.java)
            ////                }
            //                    })
        }
    }
}
